<?php
class RP_Model_DbTable_Course extends Zend_Db_Table_Abstract
{
	 protected $_name = 'course';
	 
	 public function fetchAllCourses($course_type=null){
	 	$sql = "SELECT course_id, course_name FROM course";
	 	
	 	if(isset($course_type)){
	 		$sql = $sql." WHERE course_type=\"$course_type\"";	
	 	}
	 	
	 	return $this->getAdapter()->query($sql)->fetchAll();
	 }
}
?>